/*
 * CoarseAlignmentSM.h
 *
 *  Created on: Oct 29, 2012
 *      Author: banfield
 */

#ifndef CoarseAlignmentSM_H_
#define CoarseAlignmentSM_H_

/*****************************************************
 * Function Prototypes
 ****************************************************/
void InitCoarseAlignmentSM(void);
char RunCoarseAlignmentSM(void);
void goHome(void);

float polarDist(float r1, float r2, float th1, float th2);
float cartDist(float x1, float y1, float x2, float y2);
/*****************************************************
 * State Definitions
 ****************************************************/
typedef enum {SetHomeRange,
			FindDriverSide,
			GoBackHome,
			FindPassengerSide} CoarseAlignmentSMState_t ;


/*****************************************************
 * Global Variables
 ****************************************************/
//char interruptFlag; // Flag set in interrupt response routine

#endif /* CoarseAlignmentSM_H_ */
